namespace FutureCoreEditor
{
    public static class SplitUtil
    {
        public static string[] VerticalBar(string parserStr)
        {
            string[] arr = parserStr.Split(EPSplitConst.VerticalBar);
            return arr;
        }

        public static string[] Semicolon(string parserStr)
        {
            string[] arr = parserStr.Split(EPSplitConst.Semicolon);
            return arr;
        }

        public static int[] SemicolonToIntOneArray(string parserStr)
        {
            string[] strArr = Semicolon(parserStr);
            int[] arr = new int[strArr.Length];
            for (int i = 0; i < strArr.Length; i++)
            {
                arr[i] = strArr[i].ToInt();
            }
            return arr;
        }

        public static string[][] VerticalBarSemicolon(string parserStr)
        {
            string[] arr = VerticalBar(parserStr);
            string[][] arrs = new string[arr.Length][];
            for (int i = 0; i < arr.Length; i++)
            {
                arrs[i] = Semicolon(arr[i]);
            }
            return arrs;
        }

        public static int[][] VerticalBarSemicolonToIntTwoArray(string parserStr)
        {
            string[] arr = VerticalBar(parserStr);
            int[][] arrs = new int[arr.Length][];
            for (int i = 0; i < arr.Length; i++)
            {
                arrs[i] = SemicolonToIntOneArray(arr[i]);
            }
            return arrs;
        }
    }
}